<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateJDBooksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('j_d_books', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->decimal('jd_price');
            $table->integer('job');
            $table->integer('comment_count')->nullable();
            $table->integer('average_score')->nullable();
            $table->string('jd_id', 20);
            $table->string('isbn', 20);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('j_d_books');
    }
}
